package com.molichuxing.services.infrastructure.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.StockRecordBean;

/**
 * <p>
 * 库存物流表 Mapper 接口
 * </p>
 *
 * @author liyg
 * @since 2019-08-20
 */
public interface StockRecordMapper extends RootMapper<StockRecordBean> {

	/**
	 * 获取总条数
	 * 
	 * @param map
	 * @return
	 */
	long getPageCount(Map<String, Object> map);

	/**
	 * 分页查询列表数据
	 * 
	 * @param map
	 * @param pageSize 
	 * @param pageNum 
	 * @return
	 */
	List<StockRecordBean> getPage(@Param("params") Map<String, Object> map,@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize);

	/**
	 * 根据车辆id获取库存历史流转记录
	 * @param carId
	 * @return
	 */
	List<StockRecordBean> getListByCarId(@Param("carId")Integer carId);

	/**
	 *获取收车回库数量 
	 * @param outStockIds
	 * @return
	 */
	Long getCount(@Param("outStockIds")List<Integer> outStockIds);

	/**
	 * 获取总条数
	 * @param map
	 * @return
	 */
	long getReturnStockCarListCount(Map<String, Object> map);

	/**
	 * 获取列表数据
	 * @param map
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	List<StockRecordBean> getReturnStockCarList(@Param("params") Map<String, Object> map,@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize);

	/**
	 * 根据仓库ids 和 车辆id 查询车辆历史记录
	 * @param carId
	 * @param storeIds
	 * @return
	 */
	List<StockRecordBean> getListByCarIdAndStockIds(@Param("carId") Integer carId,@Param("stockIds") List<Integer> stockIds);

   
}